package JavaCore;

public class ForTest2 {
	String title = "��ȣ";
	
	public void ex1(){
		int[][] ex = new int[5][5];
		for(int i=1;i<=5;i++){
			for(int j=1;j<=5;j++){
				System.out.print(i);				
			}
			System.out.println();			
		}	
	}
	
	public void ex2(){
		int i;
		int j;
		int k=1;
		for (i=1;i<=5;i++){
			for(j=1;j<=5;j++){
				System.out.print(k++ + " ");
			}
			System.out.println();
		}			
	}
	
	public void ex3(){
		int i;
		int j;
		int k=25;
		for (i=1;i<=5;i++){
			for(j=1;j<=5;j++){
				System.out.print(k-- + " ");
			}
			System.out.println();
		}
		
	}
	
	public void ex4(){
		int i;
		int j;
		for (i=1;i<=5;i++){
			for(j=1;j<=i;j++){
				System.out.print(i);
			}
			System.out.println();
		}
	}
	
	public void ex5(){
		int i;
		int j;
		for (i=1;i<=5;i++){
			for(j=1;j<=i;j++){
				System.out.print(j);
			}
			System.out.println();
		}
	}
	
	public void ex6(){
		int i,j;
		for (i=1;i<=5;i++){
			for(j=5;j>=i;j--){
				System.out.print(i);				
			}
			System.out.println();
		}
	}
	
	/* ex6() ����� �ҽ�
	 public void ex6(){
	 	int i,j;
	 	int m=0;
	 	for (i = 5 ; i >= 1 ; i--){
	 		m++;
	 		for (j = 1 ; j<=i ; j++){
	 			System.out.print(m);	 		
	 		}
	 		System.out.println();	 	
	 	}	 
	 }	 
	*/
		
	public void ex7(){
		int i,j,z;
		for(i=1;i<=5;i++){
			for(z=1;z<=5-i;z++){
				System.out.print(" ");
			}
			for(j=1;j<=i;j++){
			System.out.print(i);
			}
			System.out.println();			
		}
	}
	
	/* ex7() ����� �ҽ�
	public void ex7(){
		for(int k=1 ; k<=5; k++){
			int j= 5-k;
			for(int i=1; i<=j ; i++)}
				System.out.print(" ");
			}
			for(int i=1;i<=k;i++){
				System.out.print(k);
			} 
			System.out.println();
		}		
	}	
	 */
		
	public void ex8(int l){
		int i,j,k,m;
		for(i=1;i<=l;i++){
			for(j=1;j<=(2*l-1 - (2*i-1))/2;j++){
				System.out.print("*");
			}
			for(k=1;k<=2*i-1;k++){
				System.out.print(i);
			}
			for(m=1;m<=(2*l-1 - (2*i-1))/2;m++){
				System.out.print("*");
			}
			System.out.println();			
		}		
	}
	
	public void ex12(int l){
		System.out.println("=========================");
		int i,j,k,m;
		for(i=1;i<=l;i++){
			for(j=l-1;j>=i;j--){
				System.out.print("*");
			}
			for(k=1;k<2*i;k++){
				System.out.print(i);				
			}
			for(m=l-1;i<=m;m--){
				System.out.print("*");
			}
			System.out.println();			
		}		
	}
	
	public void ex9(){
		for(int i=1;i<=3;i++){
			for(int j=2; j>=i; j--){
				System.out.print("*");
			}
			for(int k=1; k<2*i;k++){
				System.out.print(i);
			}
			for(int m=2; i<=m; m--){
				System.out.print("*");
			}
			System.out.println();
		}
	}
	
	
	
	
	
	public ForTest2(){
		System.out.println(title);
	}

	public static void main(String[] args) {
		ForTest2 ft = new ForTest2();
		ft.ex12(9);
		
		


	}

}
